<html>
	<head>
		<title>AudioMash - Results for "{{ artist_name }}"</title>
		<link href='http://fonts.googleapis.com/css?family=Doppio+One' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}results.css" />
		<script src="{{ MEDIA_URL }}main.js"></script>
        <script src="{{ MEDIA_URL }}jquery.js"></script>
        <script src="{{ MEDIA_URL }}results.js"></script>
	</head>
	<body>
		<div class="header" style="float: left; width: 30%;">AudioMash</div>
        {% if user.is_authenticated %}
<div class="reg_links"><div class="reg_links_inner">Logged in as {{ user.username }}</div></div>
            <div>Logged in as {{ user.username }}</div>
        {% else %}
<div class="reg_links"><div class="reg_links_inner"><a href="/audiomash/login/">Login</a> or <a href="/audiomash/register/">Register</a></div></div>        {% endif %}
		<form action="/audiomash/search/" method="GET">{% csrf_token %}
		<input type="text" class="search_box" name="artist" value="Enter an artist's name to begin.." onclick="searchOnClick(this)" onblur="searchOnBlur(this)"
		 /><input type="submit" class="button" value="Go!"/>
		</form>

		<center>Displaying artists related to <b>"{{ artist_name }}"</b></center>
		<br>
		{% for artist in result_list %}
			<div class="result">
            <div class="rating">
                <a href="/audiomash/rate/{{ artist.4 }}/0/">Dislike</a> -
                <a href="/audiomash/rate/{{ artist.4 }}/1/">Meh</a> -
                <a href="/audiomash/rate/{{ artist.4 }}/2/">Like</a>
            </div>
            <div class="result_titlebar_active"><a href="/audiomash/search/?artist={{ artist.0 }}" alt="Search for artists similar to {{ artist.0 }}">{{ artist.0 }}</a></div>
			<div class="table" style="margin-bottom: 10px;">
				<div class="tr">
					<div class="td"><img class="artist_pic" src="{{ artist.1 }}"/></div>
					<div class="td" style="padding-left: 10px;">{% autoescape off %}{{ artist.3 }}{% endautoescape %}</div>
				</div>
			</div>
			<div class="subsection_header">Web results</div>
			<div class="subsection">
				{% for result in artist.5 %}
				<p><a href="{{ result.link }}" target="new">{{ result.title }}{{ result.shortUrl }}</a></p>
				<p>{{ result.summary }}</p>
			{% endfor %}
			</div>
			
			{% for track in artist.2 %}
			<div class="subsection_header">Track: {{ track.name }}</div>
			<div class="subsection">
						<iframe src="{{ track.video_results.0.embedUrl }}" class="embeddedVideo"></iframe>
			</div> 
			{% endfor %}
				</div><br>
		{% endfor %}
	</body>
</html>
